package com.governtalk.backend.service;

import com.governtalk.backend.dto.forum.CategoryDto;
import com.governtalk.backend.dto.forum.PostDto;
import com.governtalk.backend.dto.forum.CommentDto;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface ForumService {
    
    List<CategoryDto> getCategories();
    
    Page<PostDto> getPosts(Long categoryId, String keyword, String sortBy, String status, Pageable pageable);
    
    List<PostDto> getHotPosts(int count);
    
    List<PostDto> getLatestPosts(int count);
    
    PostDto getPostDetail(Long postId);
    
    PostDto createPost(PostDto postDto);
    
    PostDto updatePost(Long postId, PostDto postDto);
    
    void deletePost(Long postId);
    
    Map<String, Object> likePost(Long postId);
    
    Page<CommentDto> getPostComments(Long postId, Long parentId, Pageable pageable);
    
    CommentDto createComment(CommentDto commentDto);
    
    void deleteComment(Long commentId);
    
    Map<String, Object> likeComment(Long commentId);
    
    void approvePost(Long postId, String status);
    
    Page<PostDto> getPendingPosts(Pageable pageable);
}
